<div class="d-flex flex-column gap-2">
  <% if %w[database_offline api_offline].include? Settings.status %>
    <p class="mb-0">
      <%= t(".osm_offline") %>
    </p>
  <% elsif %w[database_readonly api_readonly].include? Settings.status %>
    <p class="mb-0">
      <%= t(".osm_read_only") %>
    </p>
  <% end %>

  <% if Settings.status_expected_restore_date %>
    <% expected_restore_time = Time.parse(Settings.status_expected_restore_date).utc %>
    <% if expected_restore_time > Time.now.utc %>
      <p class="mb-0">
        <%= t ".expected_restore_html", :time => friendly_date(expected_restore_time) %>
      </p>
    <% end %>
  <% end %>

  <% if Settings.status_announcement_url %>
    <p class="mb-0">
      <%= link_to t(".announcement"), Settings.status_announcement_url %>
    </p>
  <% end %>
</div>
